<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="" onsubmit="return navTabSearch(this)">
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    <@label key='cmprocess_code.C,colon'>工艺编号：</@label>
                </td>
                <td>
                    <input type="text" name="processCode" value="${condition.processCode!''}"/>
                </td>
                <td>
                    <@label key='cmprocess_name.C,colon'>工艺名称：</@label>
                </td>
                <td>
                    <input type="text" name="processText" value="${condition.processText!''}"/>
                </td>
                <td></td>
            </tr>
            <tr>
                <td>
                    <@label key='workCenter_type.C,colon'>工作中心类型：</@label>
                </td>
                <td>
                    <input name="workCenterTypeCode" id="workCenterType.code" value="${condition.workCenterTypeCode!''}" type="hidden"/>
                    <input class="notreadonly look" name="workCenterTypeText" id="workCenterType.name" type="text" value="${condition.workCenterTypeText!''}" readonly/>
                    <a class="btnLook" href="${rc.getContextPath()}/manage/workCenterType/workCenterTypeLookup" lookupGroup="workCenterType"><@label key="selected_first.C">请选择</@label></a>
                </td>
                <td>
                    <@label key='lockFlag.C,colon'>锁定标志：</@label>
                </td>
                <td>
                    <select name="lockFlag">
                        <option value="" ><@label key='all.C'>所有</@label></option>
                        <option value="0"<#if condition.lockFlag?? && condition.lockFlag == 0> selected="selected"</#if>><@label key="no.C">否</@label></option>
                        <option value="1"<#if condition.lockFlag?? && condition.lockFlag == 1> selected="selected"</#if>><@label key="yes.C">是</@label></option>
                    </select>
                </td>
                <td><div class="buttonActive"><div class="buttonContent"><button type="submit"><@label key='query.B'>查询</@label></button></div></div></td>
            </tr>
        
        </table>
    </div>
</div>
</form>

<div class="pageContent">

    <div class="panelBar">
        <ul class="toolBar">
            <@buttonRight menuCode="technology_add" labelKey="add.B" defalutName="新增">
            <li><a class="add" target="dialog" mask="true" width="900" height="620" maxable="false" rel="${navTabId!''}" title="<@label key='add.B,process.C'>新增工艺</@label>" 
            href="${rc.getContextPath()}/manage/process/addProcess?navTabId=${navTabId!''}"><span><@label key="add.B">新增</@label></span></a></li></@buttonRight>
            <@buttonRight menuCode="technology_copy" labelKey="copy.B" defalutName="复制">
            <li><a class="add" target="dialog" mask="true" width="900" height="620" maxable="false" rel="${navTabId!''}" title="<@label key='copy.B,process.C'>复制工艺</@label>" 
            href="${rc.getContextPath()}/manage/process/copyProcess?id={process_id}&navTabId=${navTabId!''}"><span><@label key="copy.B">复制</@label></span></a></li></@buttonRight>
            <@buttonRight menuCode="technology_release" labelKey="release.B" defalutName="发布">
            <li><a class="add" target="ajaxTodo" mask="true" width="900" height="620" maxable="false" rel="${navTabId!''}" title="<@label key='release.B,process.C'>发布工艺</@label>" 
            href="${rc.getContextPath()}/manage/process/releaseProcess?id={process_id}&navTabId=${navTabId!''}"><span><@label key="release.B">发布</@label></span></a></li></@buttonRight>
            <@buttonRight menuCode="technology_edit" labelKey="edit.B" defalutName="编辑">
            <li><a class="edit" target="dialog"  mask="true" width="900" height="620" maxable="false" preevent="_checkEditButtonEnable"  rel="${navTabId!''}" title="<@label key='edit.B,process.C'>编辑工艺</@label>"
            href="${rc.getContextPath()}/manage/process/editProcess?id={process_id}&navTabId=${navTabId!''}"><span><@label key="edit.B">编辑</@label></span></a></li></@buttonRight>
            <@buttonRight menuCode="technology_view" labelKey="view.B" defalutName="详情">
            <li><a class="icon" target="dialog" mask="true" width="900" height="600" maxable="false" rel="${navTabId!''}" title="<@label key='process.C,view.B'>工艺详情</@label>"
            href="${rc.getContextPath()}/manage/process/viewProcess?id={process_id}&navTabId=${navTabId!''}"><span><@label key="view.B">详情</@label></span></a></li></@buttonRight>
            <@buttonRight menuCode="technology_delete" labelKey="delete.B" defalutName="删除">
            <li><a class="delete" target="ajaxTodo" title="<@label key='delete_sure.D'>确定要删除</@label>？"
            href="${rc.getContextPath()}/manage/process/deleteProcess?id={process_id}&navTabId=${navTabId!''}"><span><@label key="delete.B">删除</@label></span></a></li></@buttonRight>
        </ul>
    </div>
    <table class="table" width="110%" layoutH="160">
        <thead>
            <tr>
                <!--  <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>-->
                <th width="80" orderField="processCode" <#if (page.orderField?? && page.orderField == 'processCode')>class="${page.orderDirection!''}"</#if>><@label key='cmprocess_code.C'>工艺编号</@label></th>
                <th width="80" orderField="processText" <#if (page.orderField?? && page.orderField == 'processText')>class="${page.orderDirection!''}"</#if>><@label key='cmprocess_name.C'>工艺名称</@label></th>
                <th width="80" orderField="processRev" <#if (page.orderField?? && page.orderField == 'processRev')>class="${page.orderDirection!''}"</#if>><@label key='cmprocessrev.C'>版本号</@label></th>
                <th width="80" orderField="workCenterTypeCode" <#if (page.orderField?? && page.orderField == 'workCenterTypeCode')>class="${page.orderDirection!''}"</#if>><@label key='workCenterTypeCode.C'>工作中心类型编号</@label></th>
                <th width="80"><@label key='typeText.C'>工作中心类型名称</@label></th>
                <th width="50"><@label key='lockFlag.C'>锁定标志</@label></th>
                <th width="50"><@label key='releaseFlag.C'>是否发布</@label></th>
                <th width="100" orderField="effectiveDate" <#if (page.orderField?? && page.orderField == 'effectiveDate')>class="${page.orderDirection!''}"</#if>><@label key='effectiveDate.C'>生效时间</@label></th>
                <th width="100" orderField="expirationDate" <#if (page.orderField?? && page.orderField == 'expirationDate')>class="${page.orderDirection!''}"</#if>><@label key='expirationDate.C'>失效时间</@label></th>
                <th width="50" orderField="createUser" <#if (page.orderField?? && page.orderField == 'createUser')>class="${page.orderDirection!''}"</#if>><@label key='createUser.C'>创建人</@label></th>
                <th width="100" orderField="createDateTime" <#if (page.orderField?? && page.orderField == 'createDateTime')>class="${page.orderDirection!''}"</#if>><@label key='createDateTime.C'>创建时间</@label></th>
                <th width="50" orderField="modifyUser" <#if (page.orderField?? && page.orderField == 'modifyUser')>class="${page.orderDirection!''}"</#if>><@label key='modifyUser.C'>修改人</@label></th>
                <th width="100" orderField="modifyDateTime" <#if (page.orderField?? && page.orderField == 'modifyDateTime')>class="${page.orderDirection!''}"</#if>><@label key='modifyDateTime.C'>修改时间</@label></th>
            </tr>
        </thead>
        <tbody>
        <#if page??><#if (page.data?size>0)> <#list page.data as process>
            <tr target="process_id" rel="${process.processCode!''}@_@${process.processRev!''}">
                <!-- <td><input name="ids" value="${process.processCode!''}" type="checkbox"></td>-->
                <td>${process.processCode!''}</td>
                <td>${process.processText!''}</td>
                <td>${process.processRev!''}</td>
                <td>${process.workCenterTypeCode!''}</td>
                <td>${process.typeText!''}</td>
                <td><#if process.lockFlag == 0><@label key="no.C">否</@label><#else><@label key="yes.C">是</@label></#if></td>
                <td><#if process.releaseFlag == 0><@label key="no.C">否</@label><#else><@label key="yes.C">是</@label></#if></td>
                <td>${(process.effectiveDate?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${(process.expirationDate?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${process.createUser!''}</td>
                <td>${(process.createDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${process.modifyUser!''}</td>
                <td>${(process.modifyDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
            </tr>
        </#list>
        <#else>
        <tr target="process_id">
                <td colspan="9" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        <#else>
        <tr target="service_id">
                <td colspan="9" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        </tbody>
    </table>
        <#include "/common/panelBar.html">
</div>
<script type="text/javascript">
    function _checkEditButtonEnable () {
        var id = $("#process_id", navTab.getCurrentPanel()).val();
        var iseditEnable = true;
        if(id && id!=""){
            $.ajax({
                async : false,
                dataType : "json",
                url:hostUrl +"/process/checkedEditButtonEnable",
                data:{'id':id},
                success:function(data){
                    if(data.statusCode == DWZ.statusCode.error){
                        iseditEnable = false;
                        alertMsg.error(data.message);
                    }
                }
            });
        }
        return iseditEnable;
    }
</script>